function TeaPickerAssistant(teaList) {
	this.teaList = teaList;
}


TeaPickerAssistant.prototype.setup = function() {
	this.controller.setupWidget("teaListWgt",
		this.listAtt = {
			itemTemplate: "tea-picker/teaPickerRowTemplate",
			listTemplate: "tea-picker/teaPickerListTemplate",
			swipeToDelete: true,
			renderLimit: 40,
			reorderable: true
		},
		this.listModel = {
			items: this.teaList
		}
	);

	this.controller.listen("teaListWgt", Mojo.Event.listTap, this.openMinder.bindAsEventListener(this));

	this.teaMenuAttr = { items: [{ items: []}, {visable: false}, {visable: false}] };
	this.teaMenuAttr.items[0].items.push({icon: "new", command: 'thisisatest'});
	

	this.controller.setupWidget(Mojo.Menu.commandMenu, undefined, this.teaMenuAttr);

	
	this.controller.setupWidget(Mojo.Menu.appMenu, myMenuAttr, myMenuModel);
};

TeaPickerAssistant.prototype.activate = function(event) {
	$("programTitle").innerHTML = "Tea Minder";
	this.controller.modelChanged(this.listModel);
};

TeaPickerAssistant.prototype.deactivate = function(event) {
	
};

TeaPickerAssistant.prototype.cleanup = function(event) {

};


TeaPickerAssistant.prototype.openMinder = function(event) {
	Mojo.Controller.stageController.pushScene("tea-minder", this.teaList[event.index]);
};
